package com.atguigu.guli.service.ucenter.service;

import com.atguigu.guli.service.base.dto.MemberDto;
import com.atguigu.guli.service.ucenter.entity.Member;
import com.atguigu.guli.service.ucenter.entity.form.LoginForm;
import com.atguigu.guli.service.ucenter.entity.form.RegisterForm;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;

/**
 * @author dyqstart
 * @create 2021-07-14-20:22
 * @since 1.0.0
 */
@Service
public interface MemberService extends IService<Member> {

    void register(RegisterForm registerForm);

    /**
     * 登录并生成JWT令牌
     * @param loginForm
     * @return JWT令牌
     */
    String login(LoginForm loginForm);


    /**
     * 通过openid返回用户信息，判断是否已注册
     * @param openid
     * @return
     */
    Member getByOpenid(String openid);


    MemberDto getMemberDtoById(String memberId);

    Integer countRegisterNum(String day);
}
